<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>1、v-text&v-html</title>
</head>

<body>
    <div id = "app">
    <div v-text="message"></div> <!-- 当作纯文本 -->
    <!-- {{}} 在网络延迟的情况下会出现暂显的情况 -->
    {{message}}
    <hr>
    <div v-html="message"></div> <!-- 将value作为html标签来解析 -->
    
   
    <!-- <a href="{{hrefx}}">连接{{hrefx}}</a> -->
    </div>
</body>

<script src="./node_modules/vue/dist/vue.js"></script>
<script>
    //1.实例vue
    new Vue({
        el: '#app',
        data: {
            message: "<a href='#'>Hello</a>"
            //hrefx: "http://www.baidu.com"
        },
    });
</script>
</html>